using System.Collections.Generic;
using FDSimpleModelGenerator.Entities.Histories;
using FDSimpleModelGenerator.IServices;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace FDSimpleModelGenerator.Pages
{
    public class HistoryModel : PageModel
    {
        private readonly IUserGenericHistoryService _userGenericHistoryService;

        public IList<UserGenericHistory> Histories { get; set; }


        public HistoryModel(IUserGenericHistoryService userGenericHistoryService)
        {
            _userGenericHistoryService = userGenericHistoryService;
        }

        public void OnGet()
        {
            Histories = _userGenericHistoryService.GetList();
        }
    }
}
